<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Global</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Global</h1>

    




<section>

<header>
    
        <h2></h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

        


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


        
    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="cookieAdd"><span class="type-signature"></span>cookieAdd<span class="signature">(datas<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **新增cookie;支持以json字符串形式传入多个cookie值；**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>datas</code></td>
            

            <td class="type">
            
                
<span class="param-type">Json</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    {}
                
                </td>
            

            <td class="description last">cookie名和值</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="cookieAdd.js.html">cookieAdd.js</a>, <a href="cookieAdd.js.html#line14">line 14</a>
    </li></ul></dd>
    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jscookieAdd({  name:'Tom',  age:18})```</code></pre>



        
            

    

    
    <h4 class="name" id="cookieGet"><span class="type-signature"></span>cookieGet<span class="signature">(cookieName<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **获取cookie值；默认以json数组格式返回所有cookie；也可获取指定cookie值**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>cookieName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'all'
                
                </td>
            

            <td class="description last">cookie名</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="cookieGet.js.html">cookieGet.js</a>, <a href="cookieGet.js.html#line19">line 19</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    cookie值
</div>



    




    <h5>Examples</h5>
    
    <pre class="prettyprint"><code>```jscookieGet()// return {name:'tom',age:'18'}```</code></pre>

    <pre class="prettyprint"><code>```jscookieGet('name')// return 'tom'```</code></pre>



        
            

    

    
    <h4 class="name" id="haveCNChars"><span class="type-signature"></span>haveCNChars<span class="signature">(str)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **判断字符串是否包含中文**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strHave.js.html">strHave.js</a>, <a href="strHave.js.html#line16">line 16</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="haveSpace"><span class="type-signature"></span>haveSpace<span class="signature">(str)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **判断字符串是否包含空格**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strHave.js.html">strHave.js</a>, <a href="strHave.js.html#line6">line 6</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isAndroid"><span class="type-signature"></span>isAndroid<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **判断是否为安卓设备**
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="isAndroid.js.html">isAndroid.js</a>, <a href="isAndroid.js.html#line5">line 5</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isApple"><span class="type-signature"></span>isApple<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **判断苹果移动设备**
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="isApple.js.html">isApple.js</a>, <a href="isApple.js.html#line5">line 5</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isEmail"><span class="type-signature"></span>isEmail<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证电子邮箱**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line86">line 86</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isIdCard"><span class="type-signature"></span>isIdCard<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证二代身份证；共18位，最后一位可为x**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line55">line 55</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isMail"><span class="type-signature"></span>isMail<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证大陆邮政编码**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line45">line 45</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isMobile"><span class="type-signature"></span>isMobile<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    判断是否为移动端设备访问
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="isMobile.js.html">isMobile.js</a>, <a href="isMobile.js.html#line5">line 5</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isPhone"><span class="type-signature"></span>isPhone<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证手机号**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line96">line 96</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isQQ"><span class="type-signature"></span>isQQ<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证QQ号；非0开头的5~13位整数**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line75">line 75</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isTel"><span class="type-signature"></span>isTel<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证电话号码**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line106">line 106</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isTest"><span class="type-signature"></span>isTest<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **判断开发测试环境；（方便外网测试及输出）**
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="isTest.js.html">isTest.js</a>, <a href="isTest.js.html#line7">line 7</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean；当url参数中isTest为true或1时返回true；
</div>



    





        
            

    

    
    <h4 class="name" id="isURL"><span class="type-signature"></span>isURL<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证是否为网址**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line65">line 65</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="isWeixin"><span class="type-signature"></span>isWeixin<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **判断微信端**
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="isWeixin.js.html">isWeixin.js</a>, <a href="isWeixin.js.html#line5">line 5</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="lengthRange"><span class="type-signature"></span>lengthRange<span class="signature">(value, minLength, maxLength)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证字符串长度范围**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>minLength</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">最小长度</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>maxLength</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">最大长度</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line15">line 15</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jslet str='ab'lengthRange(str,1,2)```</code></pre>



        
            

    

    
    <h4 class="name" id="letterBegin"><span class="type-signature"></span>letterBegin<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证字符串是否以字母开头**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line25">line 25</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="localStorageAdd"><span class="type-signature"></span>localStorageAdd<span class="signature">(obj)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **存储本地数据；（可存储多个数据，支持对象存储；）**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">json</span>


            
            </td>

            

            

            <td class="description last">接收json对象格式的数据</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="localStorageAdd.js.html">localStorageAdd.js</a>, <a href="localStorageAdd.js.html#line17">line 17</a>
    </li></ul></dd>
    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jslet opt={   uid:'01',   userInfo:{ //以对象方式存储      name:'Tom',      age:18   }}localStorageAdd(opt)```</code></pre>



        
            

    

    
    <h4 class="name" id="localStorageGet"><span class="type-signature"></span>localStorageGet<span class="signature">(dataName)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    获取localStorage值；可以使用'.'多级链式查询,如：userInfo.name;
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>dataName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">需要获取的参数名</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="localStorageGet.js.html">localStorageGet.js</a>, <a href="localStorageGet.js.html#line25">line 25</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    参数值/undefined
</div>



    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jslet obj={   uid:'001',   userInfo:{      name:'tom',      age:'18',   }}localStorageGet('uid')//return 001// 多级参数名链式查找localStorageGet('userInfo.age')//return 18```</code></pre>



        
            

    

    
    <h4 class="name" id="pureNum"><span class="type-signature"></span>pureNum<span class="signature">(value)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **验证字符串是否为纯数字**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strVerify.js.html">strVerify.js</a>, <a href="strVerify.js.html#line35">line 35</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    Boolean
</div>



    





        
            

    

    
    <h4 class="name" id="sessionStorageAdd"><span class="type-signature"></span>sessionStorageAdd<span class="signature">(obj)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **存储窗口数据；（可存储多个数据，支持对象存储；）**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Json</span>


            
            </td>

            

            

            <td class="description last">接收json对象格式的数据</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="sessionStorageAdd.js.html">sessionStorageAdd.js</a>, <a href="sessionStorageAdd.js.html#line18">line 18</a>
    </li></ul></dd>
    

    

    

    
</dl>



















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jslet opt={   uid:'01',   userInfo:{ //以对象方式存储      name:'Tom',      age:18   }}sessionStorageAdd(opt)```</code></pre>



        
            

    

    
    <h4 class="name" id="sessionStorageGet"><span class="type-signature"></span>sessionStorageGet<span class="signature">(dataName)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    获取sessionStorage值；可以使用'.'多级链式查询,如：userInfo.name;
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>dataName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">需要获取的参数名</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="sessionStorageGet.js.html">sessionStorageGet.js</a>, <a href="sessionStorageGet.js.html#line25">line 25</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    查询参数值/undefined
</div>



    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jslet obj={   uid:'001',   userInfo:{      name:'tom',      age:'18',   }}sessionStorageGet('uid')//return 001// 多级参数名链式查找sessionStorageGet('userInfo.age')//return 18```</code></pre>



        
            

    

    
    <h4 class="name" id="strDelRight"><span class="type-signature"></span>strDelRight<span class="signature">(string, number<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **删除字符串右侧**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>string</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last">必须，需要处理的字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>number</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description last">需要删除右侧的几位</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strDelRight.js.html">strDelRight.js</a>, <a href="strDelRight.js.html#line7">line 7</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    新字符串
</div>



    





        
            

    

    
    <h4 class="name" id="strJoin"><span class="type-signature"></span>strJoin<span class="signature">(arr<span class="signature-attributes">opt</span>, string<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **自定义连接符拼接字符串**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last">需要拼接的字符串数组</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>string</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">连接符</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strJoin.js.html">strJoin.js</a>, <a href="strJoin.js.html#line11">line 11</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    返回拼接完成后的字符串
</div>



    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>strJoin(['a','b','c'],'-')//return a-b-c</code></pre>



        
            

    

    
    <h4 class="name" id="strTrim"><span class="type-signature"></span>strTrim<span class="signature">(str, type<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **字符串空格处理**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last">需处理的字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">'middle'</span>
|

<span class="param-type">'left'</span>
|

<span class="param-type">'right'</span>
|

<span class="param-type">'all'</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'middle'
                
                </td>
            

            <td class="description last">type 类型</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="strTrim.js.html">strTrim.js</a>, <a href="strTrim.js.html#line24">line 24</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    字符串
</div>



    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jslet str=' 8 8 ';strTrim(str);//8 8清除了左右空格strTrim(str,'all');//88清除全部空格strTrim(str,'left');//8 8 清除左侧空格strTrim(str,'right');// 8 8清除了右侧空格```</code></pre>



        
            

    

    
    <h4 class="name" id="timeStamp"><span class="type-signature"></span>timeStamp<span class="signature">(time<span class="signature-attributes">opt</span>, type<span class="signature-attributes">opt</span>, separator<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **将时间戳转换成自定义格式**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>time</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last">时间戳</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    all
                
                </td>
            

            <td class="description last">自定义输出格式，年、月、日、时、分、秒（n、y、r、s、f、m）；默认all输出所有；</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>separator</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last">自定义连接符</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="timeStamp.js.html">timeStamp.js</a>, <a href="timeStamp.js.html#line20">line 20</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    -返回自定义日期
</div>



    




    <h5>Examples</h5>
    
        <p class="code-caption">年-月-日</p>
    
    <pre class="prettyprint"><code>timeStamp(1618298335,'nyr','-')//return 2020-01-02</code></pre>

        <p class="code-caption">年、月、日、时、分、秒可任意组合</p>
    
    <pre class="prettyprint"><code>timeStamp(1618298335,'nr','|')//return 2020|02</code></pre>



        
            

    

    
    <h4 class="name" id="totalPage"><span class="type-signature"></span>totalPage<span class="signature">(total, pageNum)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **分页计算；通过数据总条数与每页显示数据数量计算出总页数；**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>total</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">数据总条数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pageNum</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">每页显示几条数据</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="totalPage.js.html">totalPage.js</a>, <a href="totalPage.js.html#line7">line 7</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    返回计算出的总页数
</div>



    





        
            

    

    
    <h4 class="name" id="urlParamAdd"><span class="type-signature"></span>urlParamAdd<span class="signature">(datas<span class="signature-attributes">opt</span>, url<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **url参数封装(可添加多个)；支持中文字符串传参，输出base-64编码字符串**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>datas</code></td>
            

            <td class="type">
            
                
<span class="param-type">Json</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    {}
                
                </td>
            

            <td class="description last">url参数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    ''
                
                </td>
            

            <td class="description last">需要拼接的域名</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="urlParamAdd.js.html">urlParamAdd.js</a>, <a href="urlParamAdd.js.html#line29">line 29</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    返回参数组合，如：name='tom'&age=18
</div>



    




    <h5>Examples</h5>
    
    <pre class="prettyprint"><code>```jsurlParamAdd({   name:'tom',   age:18})//return bmFtZSUzRCVFNSVCQyVBMCVFNCVCOCU4OSUyNmFnZSUzRDIw```</code></pre>

    <pre class="prettyprint"><code>```js* urlParamAdd({   name:'tom',   age:18},'http://localhost:8080')//return http://localhost:8080?bmFtZSUzRCVFNSVCQyVBMCVFNCVCOCU4OSUyNmFnZSUzRDIw```</code></pre>



        
            

    

    
    <h4 class="name" id="urlParamGet"><span class="type-signature"></span>urlParamGet<span class="signature">(paramName<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    **获取url中参数，可解码URI和base-64**
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>paramName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'all'
                
                </td>
            

            <td class="description last">默认获取url中所有参数，也可指定获取url中某个参数</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="urlParamGet.js.html">urlParamGet.js</a>, <a href="urlParamGet.js.html#line18">line 18</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    默认返回所有url参数，指定获取参数后则返回指定参数
</div>



    




    <h5>Example</h5>
    
    <pre class="prettyprint"><code>```jsurl='http://localhost:8080/?name=tom&amp;age=18';urlParamGet()// return {name:'tom',age:'18'}urlParamGet('name')// return 'tom'```</code></pre>



        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#cookieAdd">cookieAdd</a></li><li><a href="global.html#cookieGet">cookieGet</a></li><li><a href="global.html#haveCNChars">haveCNChars</a></li><li><a href="global.html#haveSpace">haveSpace</a></li><li><a href="global.html#isAndroid">isAndroid</a></li><li><a href="global.html#isApple">isApple</a></li><li><a href="global.html#isEmail">isEmail</a></li><li><a href="global.html#isIdCard">isIdCard</a></li><li><a href="global.html#isMail">isMail</a></li><li><a href="global.html#isMobile">isMobile</a></li><li><a href="global.html#isPhone">isPhone</a></li><li><a href="global.html#isQQ">isQQ</a></li><li><a href="global.html#isTel">isTel</a></li><li><a href="global.html#isTest">isTest</a></li><li><a href="global.html#isURL">isURL</a></li><li><a href="global.html#isWeixin">isWeixin</a></li><li><a href="global.html#lengthRange">lengthRange</a></li><li><a href="global.html#letterBegin">letterBegin</a></li><li><a href="global.html#localStorageAdd">localStorageAdd</a></li><li><a href="global.html#localStorageGet">localStorageGet</a></li><li><a href="global.html#pureNum">pureNum</a></li><li><a href="global.html#sessionStorageAdd">sessionStorageAdd</a></li><li><a href="global.html#sessionStorageGet">sessionStorageGet</a></li><li><a href="global.html#strDelRight">strDelRight</a></li><li><a href="global.html#strJoin">strJoin</a></li><li><a href="global.html#strTrim">strTrim</a></li><li><a href="global.html#timeStamp">timeStamp</a></li><li><a href="global.html#totalPage">totalPage</a></li><li><a href="global.html#urlParamAdd">urlParamAdd</a></li><li><a href="global.html#urlParamGet">urlParamGet</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Nov 22 2021 17:08:01 GMT+0800 (中国标准时间)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>